package cn.kmust.booth.portal.service.impl;



        import cn.kmust.booth.portal.mapper.BoothMapper;
        import cn.kmust.booth.portal.model.Booth;
        import cn.kmust.booth.portal.service.IBoothService;
        import cn.kmust.booth.portal.vo.BoothUserVO;
        import com.baomidou.mybatisplus.core.conditions.Wrapper;
        import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
        import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
        import lombok.extern.slf4j.Slf4j;
        import org.springframework.beans.factory.annotation.Autowired;
        import org.springframework.context.annotation.Primary;
        import org.springframework.stereotype.Service;

        import javax.annotation.Resource;
        import java.util.Collection;
        import java.util.List;
        import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author tedu.cn
 * @since 2020-08-09
 */

@Service
@Primary
@Slf4j
public class BoothServiceImpl extends ServiceImpl<BoothMapper, Booth> implements IBoothService {

    @Autowired
    BoothMapper boothMapper;

//    @Autowired
//    ApplyMapper applyMapper;

    public Booth selectById(int id) {
        return boothMapper.selectById(id);
    }

    public List<BoothUserVO> findBoothUser() {
        return boothMapper.findBoothUser();
    }

    public BoothUserVO findBoothUser(int id){
        List<BoothUserVO> boothUser = boothMapper.findBoothUser();
        for (BoothUserVO boothUserVO : boothUser) {
            if (boothUserVO.getId().equals(id)){
                return boothUserVO;
            }

        }
        //没有匹配的数据
        return null;
    }

}
